package com.qianmi.cloud.controller;

import com.qianmi.cloud.vo.Principal;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Date 2022-02-16 11:05
 * @Created by cai chao
 */
@RestController
public class OrderController {

    //    @PreAuthorize("hasAuthority('ROLE_ADMIN')")
    @GetMapping(value = "/query/order", name = "查询订单信息")
    public Object queryGoods() {

        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        Principal principal = (Principal) authentication.getPrincipal();
        Object details = authentication.getDetails();

        System.out.printf("");
        return "";
    }
}
